package com.chengyi.serialport.demo.entity

import android.graphics.drawable.Drawable
import androidx.databinding.BaseObservable
import androidx.databinding.Bindable
import androidx.databinding.library.baseAdapters.BR
import com.wyj.utils.annotation.NotProguard
import java.io.Serializable

@NotProguard
class AppEntity() : BaseObservable(), Serializable {
    @get:Bindable
    var appFlag = 0
        set(value) {
            field = value;
            notifyPropertyChanged(BR.appFlag)
        }

    @get:Bindable
    var packageName: String? = null
        set(value) {
            field = value;
            notifyPropertyChanged(BR.packageName)
        }

    @get:Bindable
    var versionName: String? = null
        set(value) {
            field = value;
            notifyPropertyChanged(BR.versionName)
        }

    @get:Bindable
    var versionCode = 0
        set(value) {
            field = value;
            notifyPropertyChanged(BR.versionCode)
        }

    @get:Bindable
    var appLabel: String? = null
        set(value) {
            field = value;
            notifyPropertyChanged(BR.appLabel)
        }

    @get:Bindable
    @Transient
    var appIcon: Drawable? = null
        set(value) {
            field = value;
            notifyPropertyChanged(BR.appIcon)
        }
}